﻿@model ProjetoPeople.Areas.Administrativa.Models.ViewNoticia

@{
    ViewBag.Title = "Adicionar";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<h2>Adicionar</h2>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Html.BeginForm("Adicionar", "Noticia", FormMethod.Post, new { enctype = "multipart/form-data"}))
{
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>GERENCIADOR DE NOTICIAS!</legend>

        <div class="editor-label">
            NOTICIA
        </div>
        <div class="editor-field">
       @Html.TextAreaFor(model => model.Noticia, new { cols = 30 , rows = 10})
            @Html.ValidationMessageFor(model => model.Noticia)
        </div>

        <div class="editor-label">
            Nome da imagem
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.nomeImagem)
            @Html.ValidationMessageFor(model => model.nomeImagem)
        </div>
        
                <div class="editor-label">
            @Html.Label("upLoad de Imagem")
        </div>
        <div class="editor-field">
        <input type="file" name="imagem" />
        </div>

        <p>
            <input type="submit" value="Create" />
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("Back to List", "Index")
</div>
